﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
using LevelEditor.Objects.Tiles;
using LevelEditor.Objects;
using LevelEditor.Objects.Waypoints;
using LevelEditor.Components.Layers;
using LevelEditor.Objects.Layers;
using LevelEditor.Components.Waypoints;
using LevelEditor.Util;
using Microsoft.VisualBasic.PowerPacks;
using LevelEditor.App;

namespace LevelEditor.Components
{
    public class Stage :ZoomPanel
    {
        private LevelEditor editor;

        private ShapeContainer shapeContainer;
        private LineShape link;

        public Stage()
            : base()
        {
            this.DragDrop += LevelEditor_DragDrop;
            this.DragEnter += LevelEditor_DragEnter;
            this.AllowDrop = true;
            this.AutoScroll = true;

            shapeContainer = ContainerDefault();
            link = new LineShape();
            link.BorderWidth = 5;

        }

        private ShapeContainer ContainerDefault()
        {
            ShapeContainer sc = new ShapeContainer();
            sc.Top = 20;
            sc.Left = this.Left;
            return sc;
        }

        public void SetEditor(LevelEditor editor)
        {
            this.editor = editor;
        }

        protected virtual void LevelEditor_DragDrop(object sender, DragEventArgs e)
        {
            
        }

        protected virtual void LevelEditor_DragEnter(object sender, DragEventArgs e)
        {
            
            e.Effect = DragDropEffects.Copy;
        }

        public void ClearGraphics()
        {
            this.CreateGraphics().Clear(Color.White);

        }

    }
}
